package com.zimmor.buliangren;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author:zimmor
 * @Date: 2021/12/29 23:11
 * @Description springboot-rabbitmq 消费者  第一种方式 rabbitListener + Rabbithandler
 * @version: 1.0.0
 */
@Component
@RabbitListener(queues = "hello")
public class Customer4 {
    @RabbitHandler
    public void getMessage(String message) {
        System.out.println("消费者1接受到的消息是：" + message);
    }
}
